/*
 * @Author: wangze@linkstec.com
 * @Date: 2022-03-04 10:55:38
 * @Function: Please Input Function
 */
// 系统信息
const prefix = 'VINTEX_';

const state = () => ({
  dpr: window.devicePixelRatio,
  language: localStorage.getItem(prefix + 'language') || 'zh' // 中文 zh, 英文 en
});

const getters = {
  dpr: (state) => state.dpr,
  language: (state) => state.language
};

const mutations = {
  CHANGE_LANGUAGE (state, language) {
    state.language = language || 'zh';
    localStorage.setItem(prefix + 'language', language);
  }
};

const actions = {};

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
};
